import { ref } from 'vue'

export function useTestHook() {
  const value1 = ref(1)

  const value2 = ref(2)

  const cl1 = () => {
    console.log('--cl1--')
    value1.value++
  }

  const cl2 = () => {
    console.log('--cl2--')
    value2.value++
  }

  const clear = () => {
    value1.value = 0
    value2.value = 0
  }

  return {
    bindProp: {
      params1: value1,
      params2: value2
    },
    bindEvent: {
      click1: cl1,
      click2: cl2
    },
    clear
  }
}
